<?php
namespace Admin\Controller;
use Think\Controller;
use Admin\Controller\CommonController;
class IndexController extends CommonController {
    public function indexAction(){
       $this->display();
    }
    public function welcomeAction()
    {
    	$sql = "select * from user";
        $res = M()->query($sql);
        var_dump($res);
    	$sql = "select count(id) cn,FROM_UNIXTIME(create_time,'%Y-%m-%d') date from question GROUP BY date order by date desc limit 7";

    	$res = M()->query($sql);

    	//方式
    	$num = "[1900, 52, 200, 334, 390, 330, 220]";
    	$xbsdate= "['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']";

    	$this->assign('num',$num);
    	$this->assign('xbsdate',$xbsdate);
    	$this->assign('res',$res);
    	$this->display();
    }

    public function echartAction()
    {
    	$this->display();
    }
}